<?php 
get_header();


?>



<!-- START CONTACT PAGE -->
<section id="contact-page" class="section-padding pb-0">
	<div class="container">
		<div class="row">
			<div class="col-lg-12 text-center">
				<div class="section-title">
					<h5>联系我们</h5>
					<h3>7*24小时响应,时刻为你服务</h3>
					<span class="line"></span>
					<i class="icofont icofont-contact-add"></i>
				</div>
			</div>
			<!-- end section title -->
		</div>
		<!-- end row-->
	</div>
	<div class="section-padding contact-add-padd">
		<div class="auto-container">
			<div class="row">
				<div class="col-lg-4 col-md-4 col-sm-6 col-12">
					<div class="single-con-add">
						<div class="single-con-add-icon">
							<i class="icofont icofont-ui-office"></i>
						</div>
						<div class="single-con-add-text">
							<h3>办公地址</h3>
							<p><?php echo $ifan_option['company_info_address_basic']??'黑皮QQ247571488专业建站' ?></p>
						</div>
					</div>
				</div>
				<div class="col-lg-4 col-md-4 col-sm-6 col-12">
					<div class="single-con-add">
						<div class="single-con-add-icon">
							<i class="icofont icofont-ui-cell-phone"></i>
						</div>
						<div class="single-con-add-text">


							<h3>联系电话</h3>
							<p>办公室：<?php echo $ifan_option['company_info_mobile_basic']??'黑皮QQ247571488专业建站' ?></p>
							<p>售后：<?php echo $ifan_option['company_info_tel_basic']??'黑皮QQ247571488专业建站' ?></p>
						</div>
					</div>
				</div>
				<div class="col-lg-4 col-md-4 col-sm-6 col-12">
					<div class="single-con-add">
						<div class="single-con-add-icon">
							<i class="icofont icofont-email"></i>
						</div>
						<div class="single-con-add-text">
							<h3>业务邮箱</h3>
							<p><?php echo $ifan_option['company_info_mail_basic']??'黑皮QQ247571488专业建站' ?>

						</div>
					</div>
				</div>
			</div>
		</div>
		<!-- end container-->
	</div>
</section>
<!-- END CONTACT PAGE -->
<!-- 地图中心var point = new BMap.Point(109.227663,21.502414); 缩放比例12-->
<!-- 标注点109.229504|21.502721 -->


<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=rLByx0SL4zPgFYzQUzlXO2VB"></script>
<!-- START MAP -->
<div class="gmap_canvas">
	<div class="container">
		<div style="width:100%;max-width:1200px;min-width:320px;height:550px;border:#ccc solid 1px;margin: 0 auto" id="dituContent"></div>

		<script type="text/javascript">
			//创建和初始化地图函数：
			function initMap() {
				createMap();//创建地图
				setMapEvent();//设置地图事件
				addMapControl();//向地图添加控件
				addMarker();//向地图中添加marker
				addMapOverlay();
			}

			//创建地图函数：
			function createMap() {
				var map = new BMap.Map("dituContent");//在百度地图容器中创建一个地图
				var point = new BMap.Point(109.227663, 21.502414);//定义一个中心点坐标
				map.centerAndZoom(point, 12);//设定地图的中心点和坐标并将地图显示在地图容器中
				window.map = map;//将map变量存储在全局
			}

			//地图事件设置函数：
			function setMapEvent() {
				map.enableDragging();//启用地图拖拽事件，默认启用(可不写)
				map.enableScrollWheelZoom();//启用地图滚轮放大缩小
				map.enableDoubleClickZoom();//启用鼠标双击放大，默认启用(可不写)
				map.enableKeyboard();//启用键盘上下左右键移动地图

			}

			//地图控件添加函数：
			function addMapControl() {
				//向地图中添加缩放控件
				var ctrl_nav = new BMap.NavigationControl({ anchor: BMAP_ANCHOR_TOP_LEFT, type: BMAP_NAVIGATION_CONTROL_SMALL });
				map.addControl(ctrl_nav);
				//向地图中添加缩略图控件
				var ctrl_ove = new BMap.OverviewMapControl({ anchor: BMAP_ANCHOR_BOTTOM_RIGHT, isOpen: 0 });
				map.addControl(ctrl_ove);
				//向地图中添加比例尺控件
				var ctrl_sca = new BMap.ScaleControl({ anchor: BMAP_ANCHOR_BOTTOM_LEFT });
				map.addControl(ctrl_sca);
			}

			//标注点数组
			var markerArr = [
				{
					title: "广西北海佰思诺制冷设备有限公司",
					content: "<p style='text-align: center;color: rgba(0,0,255,.9);font-size:14px'>佰思诺专业服务<br />中央空调 / 中央热水系统 / 商用冷库<br />冷库安装 设计</p>",
					point: "109.229504|21.502721",
					isOpen: 1,
					icon: {
						w: 123, h: 95, l: 46, t: 21, x: 9, lb: 12
					}
				},
			];
			//创建marker
			function addMarker() {
				for (var i = 0; i < markerArr.length; i++) {
					var json = markerArr[i];
					var p0 = json.point.split("|")[0];
					var p1 = json.point.split("|")[1];
					var point = new BMap.Point(p0, p1);
					var iconImg = createIcon(json.icon);
					var marker = new BMap.Marker(point, { icon: iconImg });
					var iw = createInfoWindow(i);
					var label = new BMap.Label(json.title, { "offset": new BMap.Size(json.icon.lb - json.icon.x + 10, -20) });
					marker.setLabel(label);
					map.addOverlay(marker);
					label.setStyle({
						borderColor: "#808080",
						color: "#333",
						cursor: "pointer",

					});
					(function () {
						var index = i;
						var _iw = createInfoWindow(i);
						var _marker = marker;
						_marker.addEventListener("click", function () {
							this.openInfoWindow(_iw);
						});
						_iw.addEventListener("open", function () {
							_marker.getLabel().hide();
						})
						_iw.addEventListener("close", function () {
							_marker.getLabel().show();
						})
						label.addEventListener("click", function () {
							_marker.openInfoWindow(_iw);
						})
						if (!!json.isOpen) {
							label.hide();
							_marker.openInfoWindow(_iw);
						}
					})()
				}
			}
			//创建InfoWindow
			function createInfoWindow(i) {
				var json = markerArr[i];
				var iw = new BMap.InfoWindow("<b class='iw_poi_title' title='" + json.title + "'>" + json.title + "</b><div class='iw_poi_content'>" + json.content + "</div>");
				return iw;
			}
			//创建一个Icon
			function createIcon(json) {
				var icon = new BMap.Icon("http://api0.map.bdimg.com/images/marker_red_sprite.png", new BMap.Size(json.w, json.h), { imageOffset: new BMap.Size(-json.l, -json.t), infoWindowOffset: new BMap.Size(json.lb + 5, 1), offset: new BMap.Size(json.x, json.h) })
				return icon;
			}
			function addMapOverlay() {
				var plOpts = [
					{ strokeColor: "#f00", strokeWeight: "4", strokeOpacity: "0.6" }
				];
				var plPath = [
					[
						new BMap.Point(109.139719, 21.457749),
						new BMap.Point(109.142647, 21.458556),
						new BMap.Point(109.140096, 21.465973),
						new BMap.Point(109.176819, 21.477477),
						new BMap.Point(109.176747, 21.480571),
						new BMap.Point(109.193276, 21.485414),
						new BMap.Point(109.20463, 21.479966),
						new BMap.Point(109.215122, 21.486961),
						new BMap.Point(109.2162, 21.486423),
						new BMap.Point(109.219147, 21.490257),
						new BMap.Point(109.219596, 21.493873),
						new BMap.Point(109.229729, 21.502902),
						new BMap.Point(109.230178, 21.502667),
						new BMap.Point(109.230142, 21.502683),
						new BMap.Point(109.230142, 21.502683),

					],
				];
				for (var index = 0; index < plOpts.length; index++) {
					var polyline = new BMap.Polyline(plPath[index], plOpts[index]);
					map.addOverlay(polyline);
				}
			}
			initMap();//创建和初始化地图
		</script>
	</div>
</div>
<!-- END MAP -->


<!-- START CONTACT FORM -->
<section class="section-padding">
	<div class="container">
		<div class="row">
			<div class="col-lg-12 text-center">
				<div class="section-title">
					<h3>快速留言</h3>

				</div>
			</div>
			<!-- end section title -->
			<div class="mx-auto col-lg-10 mt-40">
				<div class="contact">

					<?php echo do_shortcode( '[contact-form-7 id="187" title="form1"]' ); ?>
				</div>
			</div>



		</div>
		<!-- end row-->
	</div>
</section>
<!-- END CONTACT FORM -->
<style>
	.BMapLabel {
		padding: 10px !important;
	}

	.wpcf7-not-valid-tip {

		padding-left: 10px;
	}

</style>
<?php 

	$main_color=$ifan_option['main-color-rgba']['rgba']??$ifan_option['main-color-rgba']['rgb'];

      echo '<style>
      .section-title span.line:before {

    background-color: '.$main_color .';

}

.single-con-add .single-con-add-icon i {

    color: '.$main_color .';

    border: 1px solid '.$main_color .';

}
.single-con-add .single-con-add-icon:before {

    color: '.$main_color .';

}
.single-con-add:hover .single-con-add-icon i {
    background: '.$main_color .';
    color: #fff;
}
.contact .form-control:focus {
    border: 1px solid '.$main_color .';
    padding-left: 20px;
}

element.style {
}
[type=button]:not(:disabled), [type=reset]:not(:disabled), [type=submit]:not(:disabled), button:not(:disabled) {
    cursor: pointer;
}
.btn-contact-bg {
    background-color: '.$main_color .';

}
	.btn-contact-bg:hover {
color:#ffffff
}
</style>
      '; 
?>
<?php



get_footer();
 ?>